import request from '@/utils/request'

export function factoryBatchOrderGetList(query) {
  return request({
    url: '/factoryBatchOrder/getList.json',
    method: 'get',
    params: query
  })
}

export function factoryBatchOrderReport(query) {
  return request({
    url: '/factoryBatchOrder/report.json',
    method: 'get',
    params: query
  })
}

export function factoryGroupAdd(opt) {
  return request({
    url: '/factoryGroup/add.json',
    method: 'post',
    data: {
      type: opt.type,
      manager_uid: opt.manager_uid,
      categoryTypes: opt.categoryTypes,
      name: opt.name
    }
  })
}

export function factoryGroupUpdate(opt) {
  return request({
    url: '/factoryGroup/update.json',
    method: 'post',
    data: {
      id: opt.id,
      manager_uid: opt.manager_uid,
      categoryTypes: opt.categoryTypes,
      name: opt.name
    }
  })
}

export function factoryGroupDelete(query) {
  return request({
    url: '/factoryGroup/delete.json',
    method: 'get',
    params: query
  })
}

export function factoryGroupGetList(query) {
  return request({
    url: '/factoryGroup/getList.json',
    method: 'get',
    params: query
  })
}

export function factoryGroupGet(query) {
  return request({
    url: '/factoryGroup/get.json',
    method: 'get',
    params: query
  })
}
